<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<html>
  <head>
    <title>分配角色</title>
    <script type="text/javascript" src="/ItsOAsystem/system/user/js/user.js"></script>
    <link href="/ItsOAsystem/system/user/css/allUser.css" rel="stylesheet" type="text/css"/>
  </head>
  
  <body>
  <jsp:include page="downFrameBar.jsp"></jsp:include>
  <input type="hidden" id="userId" value="${userid}" />
  <br/><hr/>
   <table id = "userRoletable" border="1" align="left" cellspacing="0" width="50%">
   	<tr>
   		<td width="5%"><s:checkbox id="checkall" name="checkall" theme="simple" onclick="checkAll(this)"/></td>
   		<td width="5%" style="display: none;">序号</td><td width="40%">角色代码</td><td width="40%">角色名称</td>
   	</tr>
   	<s:iterator value="roleList">
   		<tr >
   			<td><input type="checkbox" id="check" value="${id}" /></td>
   			<td style="display: none;"><s:property value="id" /><input type="hidden" id="roleid" value="${id}"/></td>
   			<td><s:property value="code" /></td>
   			<td><s:property value="name"/></td>
   		</tr>
   	</s:iterator>
   		<tr>
   			<td></td>
   			<td>
   				<s:if test='btnIds.indexOf("add")>-1'><input type="button" id="add" value="分配" onclick="openUserRoleWin()"/></s:if>
   				<s:if test='btnIds.indexOf("del")>-1'><input type="button" value="删除" onclick="delUserRole()"/></s:if>
   			</td>
   		</tr>
   </table>
  </body>
</html>
